package com.qire.manhua.model.vo;

import com.qire.common.support.base.BaseVO;

import java.util.ArrayList;

public class FriendPaidInfoVO extends BaseVO {

    public int                   is_first;       //是否首充：0-否，1-是
    public ArrayList<WaresVO>    wares;          //商品列表：List<Wares>
    public ArrayList<VipWareVO>  vip_wares;      //

    public class WaresVO {
        public int fee;                         //充值金额 : 50,
        public int bean;                        //积分豆 : 10

        public String waresFee() {
            return fee + "元";
        }

        public String waresDescribe() {
            String describeStr = goldCoin() + "金币";
            if(haveReward()) {
                describeStr += "+" + rewardBean() + "金豆";
            }
            return describeStr;
        }

        public String waresRewardFee() {
            return rewardFee() > 0 ? "(多送" + rewardFee() + "元)" : "";
        }

        public boolean haveReward() {
            return bean > 0;
        }

        private int goldCoin() {
            return fee * 100;
        }

        private int rewardFee() {
            return bean;
        }

        private int rewardBean() {
            return bean * 100;
        }
    }

    public class VipWareVO {
        public int      _fee;                   //: 30,
        public int      fee;                    //: 18,
        public float    pd;                     //: 0.6,
        public int      day;                    //: 30,
        public int      bean;                   //: 0,
        public String   code;                   //: "VIP_M_D6"

        public String waresFee() {
            return fee + "元";
        }

        public String waresDescribe() {
            return day + "天会员";
        }

        public String waresRewardFee() {
            return "(原价:" + _fee + "元)";
        }

    }
}
